package com.springday3aop.dao.impl;

import com.springday3aop.dao.BookDao;
import org.springframework.stereotype.Repository;

@Repository
public class BookDaoImpl implements BookDao {

    @Override
    public void save() {
        System.out.println(System.currentTimeMillis());
        System.out.println("book dao save...");
    }

    @Override
    public void update() {
        System.out.println("book dao update ...");
    }

    @Override
    public void select() {
        System.out.println("book dao select ...");
    }

    @Override
    public int find() {
        return 100;
    }

    @Override
    public String findName(int id, String password) {
        System.out.println("参数id:" + id);
        if(true) throw new NullPointerException(); // 手动抛出异常
        return "itcast";
    }
}
